﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ChatForum.Business.Entity;

namespace ChatForum.Business.Contract
{
    public abstract class IForumService
    {
        protected IRepository _repository;
         
        protected IForumService(IRepository repository)
        {
            if (repository == null)
                throw new ArgumentNullException("repository");
            _repository = repository;
        }

        //Lit of Contracts - defined as abstract method

		public abstract IEnumerable<Category> GetAllCategory();
		public abstract Category GetCategoryById(Guid catId);
		public abstract void CreateCategory(Category category);
		public abstract void ModifyCategory(Category category);
		public abstract void CreatePost(Post post);
        public abstract Post GetPostById(Guid postId);
		public abstract IEnumerable<Post> GetPostbyCategory(Guid categoryId, bool includeChildren);
		public abstract IEnumerable<Post> GetPostbyCreator(string userId, bool includeChildren);
		public abstract IEnumerable<Post> GetPostbyParentPost(Guid parentPostid, bool includeChildren);
        public abstract IEnumerable<Post> GetThread(Guid PostId);
    }
}
